package com.kaishengit.dao;

import com.kaishengit.entity.FileType;
import com.kaishengit.util.db.DBHelp;

public class FileTypeDao {
	private DBHelp<FileType> db = new DBHelp<FileType>();
	
	public void save (FileType ft){
		String sql="INSERT INTO t_filetype (id,name,createtime,userId,projectId)VALUES(?,?,?,?,?)";
		db.executeSQL(sql,ft.getId(),ft.getName(),ft.getCreateTime(),ft.getUserId(),ft.getProjectId());
	}
	
	public void update (FileType ft){
		String sql="update t_fileType where name=? createtime=?userId=?projectId=?where id=?";
		db.executeSQL(sql, ft.getName(),ft.getCreateTime(),ft.getUserId(),ft.getProjectId(),ft.getId());
	}
}
